package com.hengda.smart.speak.d.util;

import android.content.Context;
import android.widget.Toast;

/**
 * author: cwd
 * created on: 2017/6/7 14:11
 * email:xyzcwd02@163.com
 * description:
 */
public    class ToastUtil   {
    private static Toast mToast;
    public static  void showToast(Context context, CharSequence text){
        if (mToast == null){
            mToast = Toast.makeText(context,text,Toast.LENGTH_SHORT);
        }else {
            mToast.setText(text);
            mToast.setDuration(Toast.LENGTH_SHORT);
        }
        mToast.show();
    }

}
